from django.db import models

from utils.base import BaseModel


# Create your models here.
class Banner(BaseModel):
    title = models.CharField(max_length=255,default='')
    imgurl = models.CharField(max_length=255,default='')
    link = models.CharField(max_length=255,default='')
    class Meta:
        db_table = 'banner'
        verbose_name = '轮播图'
    def __str__(self):
        return self.title

class NavModel(BaseModel):
    name = models.CharField(max_length=255,default='')
    is_http = models.BooleanField(default=False)
    link = models.CharField(max_length=255,default='')
    position = models.IntegerField(default=0)
    class Meta:
        db_table = 'nav'
        verbose_name = '导航'
    def __str__(self):
        return self.name